<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">
<h:head>
    <title>Jstorm UI</title>
</h:head>

<h:body>
    <h:outputLink value="cluster.jsf">
        <h1>
            <h:outputText value="JStorm UI"/>
        </h1>
    </h:outputLink>

    <h2>Supervisor Summary</h2>
    <h:form>
        <p:dataTable id="supervisorsummary" var="ssumm"
                     value="#{supervisorpage.ssumm}">
            <p:column>
                <f:facet name="header">
                    <h:outputText value="Host"/>
                </f:facet>
                <h:outputText value="#{ssumm.host}"/>
            </p:column>

            <p:column>
                <f:facet name="header">
                    <h:outputText value="Uptime"/>
                </f:facet>
                <h:outputText value="#{ssumm.uptime}"/>
            </p:column>

            <p:column>
                <f:facet name="header">
                    <h:outputText value="Total Port"/>
                </f:facet>
                <h:outputText value="#{ssumm.totalPort}"/>
            </p:column>

            <p:column>
                <f:facet name="header">
                    <h:outputText value="Used Port"/>
                </f:facet>
                <h:outputText value="#{ssumm.usedPort}"/>
            </p:column>

            <p:column>
                <f:facet name="header">
                    <h:outputText value="Total Cpu"/>
                </f:facet>
                <h:outputText value="#{ssumm.totalCpu}"/>
            </p:column>

            <p:column>
                <f:facet name="header">
                    <h:outputText value="Used Cpu"/>
                </f:facet>
                <h:outputText value="#{ssumm.usedCpu}"/>
            </p:column>

            <p:column>
                <f:facet name="header">
                    <h:outputText value="Total Memory"/>
                </f:facet>
                <h:outputText value="#{ssumm.totalMem}"/>
            </p:column>

            <p:column>
                <f:facet name="header">
                    <h:outputText value="Used Memory"/>
                </f:facet>
                <h:outputText value="#{ssumm.usedMem}"/>
            </p:column>

            <p:column>
                <f:facet name="header">
                    <h:outputText value="Total Disk"/>
                </f:facet>
                <h:outputText value="#{ssumm.totalDisk}"/>
            </p:column>

            <p:column>
                <f:facet name="header">
                    <h:outputText value="Used Disk"/>
                </f:facet>
                <h:outputText value="#{ssumm.usedDisk}"/>
            </p:column>
        </p:dataTable>
    </h:form>

    <h2>Used Worker Summary</h2>
    <h:form>
        <p:dataTable id="workersummary" var="wsumm"
                     value="#{supervisorpage.wsumm}">
            <p:column>
                <f:facet name="header">
                    <h:outputText value="port"/>
                </f:facet>
                <h:outputText value="#{wsumm.port}"/>
            </p:column>

            <p:column>
                <f:facet name="header">
                    <h:outputText value="Uptime"/>
                </f:facet>
                <h:outputText value="#{wsumm.uptime}"/>
            </p:column>

            <p:column>
                <f:facet name="header">
                    <h:outputText value="Topology"/>
                </f:facet>
                <h:outputText value="#{wsumm.topology}"/>
            </p:column>

            <p:column>
                <f:facet name="header">
                    <h:outputText value="Task List"/>
                </f:facet>
                <h:outputText value="#{wsumm.tasks}"/>
            </p:column>

            <p:column>
                <f:facet name="header">
                    <h:outputText value="Component List"/>
                </f:facet>
                <h:outputText value="#{wsumm.components}"/>
            </p:column>

            <p:column>
                <f:facet name="header">
                    <h:outputText value="Cpu Num"/>
                </f:facet>
                <h:outputText value="#{wsumm.cpuNum}"/>
            </p:column>

            <p:column>
                <f:facet name="header">
                    <h:outputText value="Mem num"/>
                </f:facet>
                <h:outputText value="#{wsumm.memNum}"/>
            </p:column>

            <p:column>
                <f:facet name="header">
                    <h:outputText value="Disk"/>
                </f:facet>
                <h:outputText value="#{wsumm.disks}"/>
            </p:column>
        </p:dataTable>
    </h:form>
</h:body>
</html>